/* 
 * File:   Contexte.h
 * Author: Gab'z
 *
 * Created on 10 mai 2012, 14:46
 */

#ifndef CONTEXTE_H
#define	CONTEXTE_H
#include "Pile.h"
#include "CalcParser.h"
#include "Parametres.h"

class Contexte {
    static Contexte* instance;
    std::list<Pile*> piles;
    CalcParser* calcParser;
    Parametres* parametres;
    int pileCourante;
public:

    static Contexte* getInstance() {
        if (instance == 0) {
            instance = new Contexte();
        }
        return instance;
    }

    static void deleteInstance() {
        if (instance != 0) delete instance;
    }
private:

    Contexte();

    Contexte(const Contexte& orig);
    virtual ~Contexte();
};

#endif	/* CONTEXTE_H */

